package org.afk.tools.log;

import java.io.*;

public class StringFactory
{
	public static String toString(final Throwable t)
	{
		final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
		final PrintStream stringWriter = new PrintStream(byteArrayOutputStream);
		t.printStackTrace(stringWriter);
		return new String(byteArrayOutputStream.toByteArray());
	}
}
